<template>
   <div id="dormitory">
   <div class="picture">
    <img src="	https://chst.vip/images/img-1684754072330.jpg" alt="">
   </div>
    <el-descriptions
      title="学员资料"
      direction="vertical"
      :column="3"
      :size="size"
      border
      v-for="item in user.dormitory"
      :key="item.sId"
    >
      <el-descriptions-item label="sId">{{ item.sId }}</el-descriptions-item>
      <el-descriptions-item label="姓名">
        <el-tag size="small" class="name">{{ item.name }}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="年龄" :span="2">{{item.age}}</el-descriptions-item>
      <el-descriptions-item label="班级">{{item.class}}</el-descriptions-item>
      <el-descriptions-item label="学历" >
        <el-tag class="degree">{{item.degree}}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="项目地址" :span="2">{{ item.productUrl }}</el-descriptions-item>
      <el-descriptions-item label="描述">{{ item.description }}</el-descriptions-item>
      <el-descriptions-item label="城市">{{ item.city }}</el-descriptions-item>
      <el-descriptions-item label="项目时间" :span="2">{{ item.cTime }}</el-descriptions-item>
    </el-descriptions>
    <div class="back">
        <el-button type="primary" @click="back">返回列表</el-button>
    </div>
   </div>
  </template>
  
  <script setup>
    import{ useRouter } from 'vue-router'
    import { computed, ref } from 'vue'
    import useUser from "../../../../store/user.js";
    let user = useUser()
    let router = useRouter()

    let back = () =>{
        router.push('product')
    }
  </script>
  
  <style scoped>
  .el-descriptions {
    margin-top: 20px;
  }
  .picture{
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
 .back{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
 }
 .name{
    background: #67c23a;
    color: white;
    height: 32px;
    
 }
 .degree{
    height: 32px;
 }
  </style>
  